package bigdata.mysql;

import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.Statement;

public class MysqlInsert {
    public static void main(String[] args) throws Exception {
        Class.forName("com.mysql.jdbc.Driver");
        Connection c = DriverManager.getConnection("jdbc:mysql://master:3306/test", "root", "123456");

        String sql = "insert into dept(DEPTNO,DNAME,LOC) values(70,'nnn','nnn')";
        Statement s = c.createStatement();
        int i = s.executeUpdate(sql);
        System.out.println(i);
        s.close();
        c.close();


    }
}
